home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 32 / cadence.zip / VOL1NO1.ZIP / ACAD-BM.LSP < prev    next >
Text File  |  1986-02-05  |  3KB  |  107 lines

  1. (defun C:StartClock ()
  2.    (prompt "Starting Timer Now !")
  3.    (setq DateT1 (getvar "date"))
  4.    (terpri))
  5.  
  6. (defun C:StopClock ()
  7.    (setq DateT2 (getvar "date"))
  8.    (prompt "Stoping Timer Now !")
  9.    (terpri))
  10.  
  11. (defun C:ReadClock ()
  12.    (prompt "Timing Recorded (Sec) ")
  13.    (WriteClock nil)
  14.    (terpri))
  15.  
  16. (defun WriteClock (File)
  17.    (if File (princ (* 86400.0 (- DateT2 DateT1)) File)
  18.                   (princ (* 86400.0 (- DateT2 
  19.                                        DateT1))))) 
  20.  
  21. (defun C:BM1 ( / Time Loop DateT1 DateT2)
  22.    (prompt "ADSI ACAD-BenchMark #1 Vers 1.0 = ")
  23.    (prompt "(while (< X 100) (setq X (1+ X)))")
  24.    (terpri)
  25.    (setq loop 0
  26.          Time 0.0)
  27.    (while (< loop 8)
  28.       (gc)
  29.       (setq X 0
  30.             Loop (1+ Loop))
  31.       (setq DateT1 (getvar "date"))
  32.       (while (< X 100) (setq X (1+ X)))
  33.       (setq DateT2 (getvar "date"))
  34.       (setq Time (+ Time (* 86400.0 (- DateT2 
  35.                                        DateT1)))))
  36.    (prompt "Time = (Sec.) ")
  37.    (princ (/ Time 5.0))
  38.    (terpri))
  39.  
  40. (defun C:BM2 ( / Time Loop DateT1 DateT2)
  41.    (prompt "ADSI ACAD-BenchMark #2 Vers 1.0 = ")
  42.    (prompt "Regen / Redraw")
  43.    (terpri)
  44.    (setq Time 0.0)
  45.    (gc)
  46.    (setq DateT1 (getvar "date"))
  47.    (redraw)
  48.    (setq DateT2 (getvar "date"))
  49.    (textscr)
  50.    (prompt "Redraw Time = (Sec.) ")
  51.    (princ (* 86400.0 (- DateT2 DateT1)))
  52.    (terpri)
  53.    (gc)
  54.    (setq DateT1 (getvar "date"))
  55.    (command "regen")
  56.    (setq DateT2 (getvar "date"))
  57.    (textscr)
  58.    (prompt "Regen Time = (Sec.) ")
  59.    (princ (* 86400.0 (- DateT2 DateT1)))
  60.    (terpri)
  61. )
  62. (defun C:BM3 ( / Line DateT1 DateT2)
  63.    (prompt "ADSI ACAD-BenchMark #3 Vers 1.0 = ")
  64.    (prompt "Sequential File Access ")
  65.    (terpri)
  66.    (setq Time 0.0)
  67.    (gc)
  68.    (setq DateT1 (getvar "date"))
  69.    (setq Line "")
  70.    ;
  71.    (setq Infile (open "ADSITEST.INF" "r"))
  72.    (setq Outfile (open "ADSITEST.OUT" "w"))
  73.    (while Line
  74.           (setq Line (read-line InFile))
  75.           (gc)  ; Required to circumvent bug in ACAD 2.52 
  76.           (if Line (write-line Line Outfile)))
  77.    (setq Infile (close Infile))
  78.    (setq Outfile (close Outfile))
  79.    ;
  80.    (setq DateT2 (getvar "date"))
  81.    (prompt " Time = (Sec.) ")
  82.    (princ (* 86400.0 (- DateT2 DateT1)))
  83.    (terpri)
  84.    (gc)
  85. )
  86. (defun C:BM4 ( / Line DateT1 DateT2)
  87.    (prompt "ADSI ACAD-BenchMark #4 Vers 1.0 = ")
  88.    (prompt "Sequential File Read ")
  89.    (terpri)
  90.    (setq Time 0.0)
  91.    (gc)
  92.    (setq DateT1 (getvar "date"))
  93.    (setq Line "")
  94.    ;
  95.    (setq Infile (open "ADSITEST.INF" "r"))
  96.    (while Line
  97.           (setq Line (read-line InFile))
  98.           (gc)); Required to circumvent bug in ACAD 2.52
  99.    (setq Infile (close Infile))
  100.    ;
  101.    (setq DateT2 (getvar "date"))
  102.    (prompt " Time = (Sec.) ")
  103.    (princ (* 86400.0 (- DateT2 DateT1)))
  104.    (terpri)
  105.    (gc)
  106. )
  107.